<!--
 * @Author: fisher
 * @Date: 2024-02-18 10:17:21
 * @LastEditors: fisher luthor-li@qq.com
 * @LastEditTime: 2024-04-12 09:24:38
 * @FilePath: \allfront\src\modules\cesium\tools\3dtiles\index.vue
 * @Description: 
-->
<template>
  <el-input class="pathInput" v-model="path" placeholder="输入3dtiles地址">
    <template #append>
      <el-icon @click="load3dtiles"><MapLocation /></el-icon>
    </template>
  </el-input>
</template>

<script setup>
import { load3dtilesByUrl } from '@/utils/cesium/load';
import { setView2Obj } from '@/utils/cesium/common';
import { ref } from 'vue';
const path = ref('');
const load3dtiles = () => {
  load3dtilesByUrl({
    url: `http://10.218.44.40:624/static/3dtiles/${path.value}/tileset.json`,
    title: path.value,
  }).then(res => {
    setView2Obj(res);
  });
};
</script>
<style scoped>
.pathInput {
  width: 400px;
}
</style>
